#pragma once
#include "TimeStamp.h"
#include "Si.h"


class Item {
	int		  _id;
	Kg		  _weight;
	Kg		  _stored;
	TimeStamp _arrived;

public:
	Item() {}
	Item(const int& id, const Kg& weight, const TimeStamp& arrived) : _id(id), _weight(weight), _stored(0), _arrived(arrived) {}

	const int& ID() const { return _id; }
	const Kg& Weight() const { return _weight; }
	bool Stored() const { return _stored == _weight; }
	const TimeStamp& ArrivedAt() const { return _arrived; }

	void Store(const Kg& amount);
	
	friend std::istream& operator>>(std::istream& is, Item& rhs);
	friend std::ostream& operator<<(std::ostream& os, const Item& rhs);
};

